﻿@model Physis.Client.Models.Sponsor.SponsorEnrollModel

@{ Layout = "~/Views/ApplicationMaster.cshtml"; }


@section ApplicationTitleBarLinks {
         
    <td id="ApplicationTitleBarThemeSelector">

        <select onchange="UpdateTheme($(this).val());">

            <option value="Blitzer">Blitzer</option>

            <option value="Cupertino">Cupertino</option>

            <option value="Darkness">Darkness</option>

            <option value="Eggplant">Eggplant</option>

            <option value="Humanity">Humanity</option>

            <option value="Lightness">Lightness</option>

            <option value="Overcast">Overcast</option>

            <option value="Redmond">Redmond</option>

            <option value="Smoothness">Smoothness</option>

            <option value="Start">Start</option>

            <option value="Sunny">Sunny</option>

        </select>

    </td>
                           
}

<form>

@Html.HiddenFor(model => model.Sponsor.Id)

@Html.HiddenFor(model => model.Sponsor.Name)

@Html.HiddenFor(model => model.Sponsor.SponsorTypeId)


<div id="SponsorContent" style="margin-left: 4px; margin-right: 6px; margin-top: 4px;">

    <div id="SponsorSummaryContainer" class="ui-widget-content-background ui-widget-content-color TextNormal" style="padding: 0px; margin-bottom: 6px;border: solid 1px; ">

        <div style="padding: 4px;">
            
            <table style="border-collapse:separate; border-spacing: 5px;" > 

                <thead><tr>

                    <th style="width: 40px;"></th>

                    <th></th>
                    
                </tr></thead>

                <tbody>
                    
                    <tr>

                        <td><span id="Sponsor_Name_Label" style="font-weight: bold;">Name:</span></td>

                        <td>@Model.Sponsor.Name</td>

                    </tr>

                    <tr>

                        <td style="font-weight: bold;">Type:</td>

                        <td>@Model.Sponsor.SponsorTypeName</td>

                    </tr>
              
                </tbody>

            </table>  
        
        </div>

        <div id="ExceptionMessageRow" style="display: @((Model.HasException) ? "block" : "none"); margin: 12px; padding: 6px; border: 1px solid black; background-color: #FFDFDF">
        
            <table cellpadding="0" cellspacing="0" width="100%"><tr style="height: 36px;">
                        
                <td style="width: 20px;"><img src="@Url.Content("~/Assets/Images/Common16/Stop.png")" style="padding-right: 8px;" alt="Exception Indicator" /></td>
                
                <td style="width: 125px; font-weight: bold; color: #A60000">Exception Occurred:</td>
                
                <td id="ExceptionMessageCell" style="text-align: left;">@Model.ExceptionMessage</td>

            </tr></table>
            
        </div>
           
    </div>
    
    <div id="SponsorEnrollmentContainer" class="ui-widget-content-background ui-widget-content-color TextNormal" style="padding: 0px; margin-bottom: 6px;border: solid 1px; ">

        <div style="padding: 4px;">
            
            <table border="0" style=" border-collapse:separate; border-spacing: 6px;">

                <thead><tr>
                    
                    <th style="width: 24px;"></th>
                    
                    <th style="width: 125px;"></th>
                    
                    <th style="width: 250px"></th>
                    
                    <th style=""></th>
                    
                </tr></thead>

                <tbody>

                    <tr><td></td>

                        <td>Effective Date:</td><td><input id="Sponsor_Enrollment_EffectiveDate" name="Sponsor.Enrollment.EffectiveDate" type="text" class="InputDate" style="width: 100px;" /></td>
                       
                    </tr>
                    
                    <tr><td></td>

                        <td>Enrollment Reason:</td>
                        
                        <td>@Html.DropDownList("Sponsor.Enrollment.EnrollmentActionReasonId", Model.EnrollmentReasonSelectList, new { style="width: 250px;" })</td>
                                                    
                    </tr>

                @if (Model.Sponsor.SponsorType.AllowedParent (0)) {
                    
                    <tr>
                    
                        <td><input type="radio" name="Sponsor_EnrollThroughSelection" value="1" onclick="Sponsor_EnrollThroughSelection_OnClick();" /></td>
                        
                        <td>Direct to Program<span>:</span></td>

                        <td><span>@Html.DropDownList("Sponsor_DirectProgramId", Model.ProgramSelectList, new { style="width: 250px;" })</span></td>
                        
                    </tr>

                }

                else {
                    
                    <tr><td colspan="3">&nbsp;</td></tr>
                    
                }
                
                    <tr>

                        <td><input type="radio" name="Sponsor_EnrollThroughSelection" value="0" onclick="Sponsor_EnrollThroughSelection_OnClick();" />
                        
                        <td>Through Sponsor<span>:</span></td>

                        <td><input id="Sponsor_ParentSponsorId" name="Sponsor.Enrollment.ParentSponsorId" type="text" style="" /></td>
                        
                    </tr>
                
                    <tr id="Sponsor_EnrollThrough_SponsorProgram"><td></td>

                        <td>into Program:</td>
                    
                        <td>

                            <div><select id="Sponsor_ThroughProgramId" name="Sponsor.Enrollment.ParentProgramId" style="width: 250px;"></select></div>
                            
                            <div id="Sponsor_ThroughProgramId_ProgressBar" style="width: 248px;"></div>

                        </td>
                        
                    </tr>

                </tbody>

            </table>

        </div>

    </div>
    
    <div id="ButtonContainer" class="ui-widget-content-background ui-widget-content-color TextNormal" style="padding: 6px; margin-bottom: 6px;border: solid 1px; ">

        <table style="width: 100%;" border="0"><tr>
    
            <td style="padding-left: .125in; white-space: nowrap; width: 85px; font-weight: bold;">Last Response:</td>

            <td style="padding-left: .125in;"><label id="LastResponseMessageLabel"></label></td>
    
            <td style="width: .125in;">&nbsp;<input id="ButtonClicked" name="ButtonClicked" type="hidden" value="" /></td>

            <td style="padding-right: .125in; width: 45px;">

                <div id="AjaxWorking" style="display: none;">

                    <div>Working</div>
                
                    <div id="AjaxWorking_ProgressBar" style="width: 45px;"></div>                    

                </div>

            </td>

            <td style="width: 80px;"><button id="ButtonOK" type="button" style="width: 75px; height: 24px; font-size: 8pt; padding: 0px;" onclick="OkApply_OnClick (this);" value="OK">OK</button></td>    
    
            <td style="width: .125in;">&nbsp;</td>

            <td style="width: 80px;"><button id="ButtonCancel" type="button" style="width: 75px; height: 24px; font-size: 8pt; padding: 0px;" onclick="window.close();" value="Cancel">Cancel</button></td>    
        
        </tr></table>

    </div>

 </div>

</form>

<script type="text/javascript" src="~/Scripts/Application/Sponsor/SponsorEnroll.js"></script>

